Lines Matching full:code
37 <li><a href="#precode">Code Blocks</a></li>
45 <li><a href="#code">Code</a></li>
102 <code><div></code>, <code><table></code>,
103 <code><pre></code>, <code><p></code>, etc. -- must be
107 <code><p></code> tags around HTML block-level tags.</p>
110 <code>This is a regular paragraph.
119 </code>
123 <code>*emphasis*</code> inside an HTML block.</p>
124 <p>Span-level HTML tags -- e.g. <code><span></code>,
125 <code><cite></code>, or <code><del></code> -- can be
128 e.g. if you'd prefer to use HTML <code><a></code> or
129 <code><img></code> tags instead of Markdown's link or image
135 <code><</code> and <code>&</code>. Left angle brackets are
138 entities, e.g. <code>&lt;</code>, and
139 <code>&amp;</code>.</p>
142 '<code>AT&amp;T</code>'. You even need to escape ampersands
145 <code>http://images.google.com/images?num=30&q=larry+bird
146 </code>
150 <code>http://images.google.com/images?num=30&amp;q=larry+bird
151 </code>
153 <p>in your anchor tag <code>href</code> attribute. Needless to say,
160 be translated into <code>&amp;</code>.</p>
164 <code>&copy;
165 </code>
169 <code>AT&T
170 </code>
174 <code>AT&amp;T
175 </code>
181 <code>4 < 5
182 </code>
186 <code>4 &lt; 5
187 </code>
189 <p>However, inside Markdown code spans and blocks, angle brackets
191 makes it easy to use Markdown to write about HTML code. (As opposed
193 syntax, because every single <code><</code> and
194 <code>&</code> in your example code needs to be escaped.)</p>
208 <code><br /></code> tag.</p>
209 <p>When you <em>do</em> want to insert a <code><br /></code>
212 <p>Yes, this takes a tad more effort to create a <code><br
213 /></code>, but a simplistic "every line break is a <code><br
214 /></code>" rule wouldn't work for Markdown. Markdown's
226 <code>This is an H1
231 </code>
233 <p>Any number of underlining <code>=</code>'s or <code>-</code>'s
238 <code># This is an H1
243 </code>
251 <code># This is an H1 #
256 </code>
259 <p>Markdown uses email-style <code>></code> characters for
263 <code>></code> before every line:</p>
265 <code>> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
271 </code>
274 <code>></code> before the first line of a hard-wrapped
277 <code>> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
283 </code>
286 adding additional levels of <code>></code>:</p>
288 <code>> This is the first level of quoting.
293 </code>
296 headers, lists, and code blocks:</p>
298 <code>> ## This is a header.
303 > Here's some example code:
306 </code>
317 <code>* Red
320 </code>
324 <code>+ Red
327 </code>
331 <code>- Red
334 </code>
338 <code>1. Bird
341 </code>
347 <code><ol>
352 </code>
356 <code>1. Bird
359 </code>
363 <code>3. Bird
366 </code>
382 <code>* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
387 </code>
391 <code>* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
396 </code>
399 the items in <code><p></code> tags in the HTML output. For
402 <code>* Bird
404 </code>
408 <code><ul>
412 </code>
416 <code>* Bird
419 </code>
423 <code><ul>
427 </code>
433 <code>1. This is a list item with two paragraphs. Lorem ipsum dolor
442 </code>
447 <code>* This is a list item with two paragraphs.
454 </code>
457 <code>></code> delimiters need to be indented:</p>
459 <code>* A list item with a blockquote:
463 </code>
465 <p>To put a code block within a list item, the code block needs to
468 <code>* A list item with a code block:
470 <code goes here>
471 </code>
476 <code
477 </code>
483 <code>1986\. What a great season.
484 </code>
486 <h3 id="precode">Code Blocks</h3>
487 <p>Pre-formatted code blocks are used for writing about programming
488 or markup source code. Rather than forming normal paragraphs, the
489 lines of a code block are interpreted literally. Markdown wraps a
490 code block in both <code><pre></code> and
491 <code><code></code> tags.</p>
492 <p>To produce a code block in Markdown, simply indent every line of
496 <code>This is a normal paragraph:
498 This is a code block.
499 </code>
503 <code><p>This is a normal paragraph:</p>
505 <pre><code>This is a code block.
506 </code></pre>
507 </code>
510 each line of the code block. For example, this:</p>
512 <code>Here is an example of AppleScript:
517 </code>
521 <code><p>Here is an example of AppleScript:</p>
523 <pre><code>tell application "Foo"
526 </code></pre>
527 </code>
529 <p>A code block continues until it reaches a line that is not
531 <p>Within a code block, ampersands (<code>&</code>) and angle
532 brackets (<code><</code> and <code>></code>) are
534 to include example HTML source code using Markdown -- just paste it
538 <code> <div class="footer">
541 </code>
545 <code><pre><code>&lt;div class="footer"&gt;
548 </code></pre>
549 </code>
551 <p>Regular Markdown syntax is not processed within code blocks.
552 E.g., asterisks are just literal asterisks within a code block.
556 <p>You can produce a horizontal rule tag (<code><hr
557 /></code>) by placing three or more hyphens, asterisks, or
562 <code>* * *
573 </code>
588 <code>This is [an example](http://example.com/ "Title") inline link.
591 </code>
595 <code><p>This is <a href="http://example.com/" title="Title">
600 </code>
605 <code>See my [About](/about/) page for details.
606 </code>
612 <code>This is [an example][id] reference-style link.
613 </code>
618 <code>This is [an example] [id] reference-style link.
619 </code>
624 <code>[id]: http://example.com/ "Optional Title Here"
625 </code>
640 <code>[id]: <http://example.com/> "Optional Title Here"
641 </code>
647 <code>[id]: http://example.com/longish/path/to/resource/here
649 </code>
658 <code>[link text][a]
660 </code>
669 <code>[Google][]
670 </code>
674 <code>[Google]: http://google.com/
675 </code>
680 <code>Visit [Daring Fireball][] for more information.
681 </code>
685 <code>[Daring Fireball]: http://daringfireball.net/
686 </code>
694 <code>I get 10 times more traffic from [Google] [1] than from
700 </code>
705 <code>I get 10 times more traffic from [Google][] than from
711 </code>
716 <code><p>I get 10 times more traffic from <a href="http://google.com/"
720 </code>
725 <code>I get 10 times more traffic from [Google](http://google.com/ "Google")
728 </code>
743 <p>Markdown treats asterisks (<code>*</code>) and underscores
744 (<code>_</code>) as indicators of emphasis. Text wrapped with one
745 <code>*</code> or <code>_</code> will be wrapped with an HTML
746 <code><em></code> tag; double <code>*</code>'s or
747 <code>_</code>'s will be wrapped with an HTML
748 <code><strong></code> tag. E.g., this input:</p>
750 <code>*single asterisks*
757 </code>
761 <code><em>single asterisks</em>
768 </code>
775 <code>un*fucking*believable
776 </code>
778 <p>But if you surround an <code>*</code> or <code>_</code> with
784 <code>\*this text is surrounded by literal asterisks\*
785 </code>
787 <h3 id="code">Code</h3>
788 <p>To indicate a span of code, wrap it with backtick quotes
789 (<code>`</code>). Unlike a pre-formatted code block, a code span
790 indicates code within a normal paragraph. For example:</p>
792 <code>Use the `printf()` function.
793 </code>
797 <code><p>Use the <code>printf()</code> function.</p>
798 </code>
800 <p>To include a literal backtick character within a code span, you
804 <code>``There is a literal backtick (`) here.``
805 </code>
809 <code><p><code>There is a literal backtick (`) here.</code></p>
810 </code>
812 <p>The backtick delimiters surrounding a code span may include
815 end of a code span:</p>
817 <code>A single backtick in a code span: `` ` ``
819 A backtick-delimited string in a code span: `` `foo` ``
820 </code>
824 <code><p>A single backtick in a code span: <code>`</code></p>
826 <p>A backtick-delimited string in a code span: <code>`foo`</code></p>
827 </code>
829 <p>With a code span, ampersands and angle brackets are encoded as
833 <code>Please don't use any `<blink>` tags.
834 </code>
838 <code><p>Please don't use any <code>&lt;blink&gt;</code> tags.</p>
839 </code>
843 <code>`&#8212;` is the decimal-encoded equivalent of `&mdash;`.
844 </code>
848 <code><p><code>&amp;#8212;</code> is the decimal-encoded
849 equivalent of <code>&amp;mdash;</code>.</p>
850 </code>
860 <code>![Alt text](/path/to/img.jpg)
863 </code>
867 <li>An exclamation mark: <code>!</code>;</li>
869 <code>alt</code> attribute text for the image;</li>
871 the image, and an optional <code>title</code> attribute enclosed in
876 <code>![Alt text][id]
877 </code>
883 <code>[id]: url/to/image "Optional title attribute"
884 </code>
888 use regular HTML <code><img></code> tags.</p>
898 <code><http://example.com/>
899 </code>
903 <code><a href="http://example.com/">http://example.com/</a>
904 </code>
912 <code><address@example.com>
913 </code>
917 <code><a href="&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
921 </code>
933 with literal asterisks (instead of an HTML <code><em></code>
936 <code>\*literal asterisks\*
937 </code>
942 <code>\ backslash
954 </code>